package com.zsrt.java.day20161222.hzj;

import org.junit.Test;

public class MathDemo {

	@Test()
	public void md(){
		
		int java =90;
		int sql = 88;
		int web = 95;
		
		System.out.println("---------------------------------");
		System.out.println("java\t"+ "sql\t"+"web");
		
		System.out.println(java+"\t"+ sql+"\t"+web);
		
		System.out.println("---------------------------------");
		
		int sub = java-sql;
		System.out.println("java和sql的成绩"+sub);
		
		int sum = java+web+sql;
		
		System.out.println(sum/3);
		System.out.println(sum/3.0);
		
		//double精度丢失问题,面向对象的时候可以完美解决
		
		double a = 1.23;
		double b = 3.21;
		
		System.out.println(b+a);
	}
}
